package 集合.day1.demo1;

import java.util.*;

public class Test1 {
    public static void main(String[] args) {
        List arr=new ArrayList(50);

        arr.add(3);
        arr.add("abc");
        arr.add(0,"hello");
        System.out.println(arr);
        System.out.println(arr.indexOf("abc111"));
        System.out.println("-----------------");
        for(int i=0;i<arr.size();i++){
            System.out.println(arr.get(i));
        }
        System.out.println("-------------");
        for(Object o:arr){
            System.out.println(o);
        }
        System.out.println(arr.subList(1, 2));
        arr.set(0,"嘿戴口罩");
        arr.remove(new Integer(3));
        System.out.println(arr);
        arr.toArray();
        List list= Arrays.asList(1,2,3,4);
        System.out.println(String.join("-", arr));
        System.out.println("---------------------------");
        Vector a1=new Vector();
        a1.add("one");
        a1.add("two");
        Enumeration e=a1.elements();
        while (e.hasMoreElements()){
            System.out.println(e.nextElement());
        }
    }
}
